package com.sf.webside.dao;

import com.sf.webside.entity.SysUserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

/**
 * Created by tanjing on 2019/2/21.
 */
@Repository
public interface SysUserDao extends JpaRepository<SysUserEntity,String>,JpaSpecificationExecutor<SysUserEntity>{
    /**
     * 根据登录名查询用户
     */
    SysUserEntity findByLoginNameAndDelFlag(String loginName,String delFlag);
    /**
     * 根据id查询用户
     */
    SysUserEntity findByIdAndDelFlag(String id,String delFlag);
    /**
     * 根据token查询用户
     */
    SysUserEntity findByTokenAndDelFlag(String token,String delFlag);
}
